<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:cap="urn:oasis:names:tc:emergency:cap:1.1" xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:emergency:cap:1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="alert">
    <xs:annotation>
      <xs:documentation>CAP Alert Message (version 1.1)</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="identifier" type="xs:string" />
        <xs:element name="sender" type="xs:string" />
        <xs:element name="sent" type="xs:dateTime" />
        <xs:element name="status">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="Actual" />
              <xs:enumeration value="Exercise" />
              <xs:enumeration value="System" />
              <xs:enumeration value="Test" />
              <xs:enumeration value="Draft" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="msgType">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="Alert" />
              <xs:enumeration value="Update" />
              <xs:enumeration value="Cancel" />
              <xs:enumeration value="Ack" />
              <xs:enumeration value="Error" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" name="source" type="xs:string" />
        <xs:element name="scope">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="Public" />
              <xs:enumeration value="Restricted" />
              <xs:enumeration value="Private" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" name="restriction" type="xs:string" />
        <xs:element minOccurs="0" name="addresses" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="unbounded" name="code" type="xs:string" />
        <xs:element minOccurs="0" name="note" type="xs:string" />
        <xs:element minOccurs="0" name="references" type="xs:string" />
        <xs:element minOccurs="0" name="incidents" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="unbounded" name="info">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" default="en-US" name="language" type="xs:language" />
              <xs:element maxOccurs="unbounded" name="category">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Geo" />
                    <xs:enumeration value="Met" />
                    <xs:enumeration value="Safety" />
                    <xs:enumeration value="Security" />
                    <xs:enumeration value="Rescue" />
                    <xs:enumeration value="Fire" />
                    <xs:enumeration value="Health" />
                    <xs:enumeration value="Env" />
                    <xs:enumeration value="Transport" />
                    <xs:enumeration value="Infra" />
                    <xs:enumeration value="CBRNE" />
                    <xs:enumeration value="Other" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="event" type="xs:string" />
              <xs:element minOccurs="0" maxOccurs="unbounded" name="responseType">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Shelter" />
                    <xs:enumeration value="Evacuate" />
                    <xs:enumeration value="Prepare" />
                    <xs:enumeration value="Execute" />
                    <xs:enumeration value="Monitor" />
                    <xs:enumeration value="Assess" />
                    <xs:enumeration value="None" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="urgency">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Immediate" />
                    <xs:enumeration value="Expected" />
                    <xs:enumeration value="Future" />
                    <xs:enumeration value="Past" />
                    <xs:enumeration value="Unknown" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="severity">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Extreme" />
                    <xs:enumeration value="Severe" />
                    <xs:enumeration value="Moderate" />
                    <xs:enumeration value="Minor" />
                    <xs:enumeration value="Unknown" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="certainty">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Observed" />
                    <xs:enumeration value="Likely" />
                    <xs:enumeration value="Possible" />
                    <xs:enumeration value="Unlikely" />
                    <xs:enumeration value="Unknown" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element minOccurs="0" name="audience" type="xs:string" />
              <xs:element minOccurs="0" maxOccurs="unbounded" name="eventCode">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="cap:valueName" />
                    <xs:element ref="cap:value" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" form="qualified" name="effective" type="xs:dateTime" />
              <xs:element minOccurs="0" name="onset" type="xs:dateTime" />
              <xs:element minOccurs="0" name="expires" type="xs:dateTime" />
              <xs:element minOccurs="0" name="senderName" type="xs:string" />
              <xs:element minOccurs="0" name="headline" type="xs:string" />
              <xs:element minOccurs="0" name="description" type="xs:string" />
              <xs:element minOccurs="0" name="instruction" type="xs:string" />
              <xs:element minOccurs="0" name="web" type="xs:anyURI" />
              <xs:element minOccurs="0" name="contact" type="xs:string" />
              <xs:element minOccurs="0" maxOccurs="unbounded" name="parameter">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="cap:valueName" />
                    <xs:element ref="cap:value" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="resource">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="resourceDesc" type="xs:string" />
                    <xs:element minOccurs="0" name="mimeType" type="xs:string" />
                    <xs:element minOccurs="0" name="size" type="xs:integer" />
                    <xs:element minOccurs="0" name="uri" type="xs:anyURI" />
                    <xs:element minOccurs="0" name="derefUri" type="xs:string" />
                    <xs:element minOccurs="0" name="digest" type="xs:string" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="area">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="areaDesc" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="polygon" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="circle" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="geocode">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element ref="cap:valueName" />
                          <xs:element ref="cap:value" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" name="altitude" type="xs:string" />
                    <xs:element minOccurs="0" name="ceiling" type="xs:string" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="valueName" type="xs:string" />
  <xs:element name="value" type="xs:string" />
</xs:schema>